﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JChatData.Helper;
using System.IO;
using JChatSerVices.GetConnect;
using JChatSerVices.LogServices;
using JChatCore.Log;
using JChatAdmin.Models.LogModel;
namespace JChatAdmin.Controllers
{
    public class LogController : Controller
    {
        //
        // GET: /Log/
        LogService _log;
        public LogController()
        {
            _log = new LogService();
        }
        [HttpGet]
        public ActionResult SystemLog()
        {
            var log = this._log.GetAllLog();
            ViewBag.data = log;
            Session["so"] = log.Count();
            return View("SystemLog");
        }


       
        public ActionResult Delete(int id)
        {
            this._log.Delete(id);
            return RedirectToAction("SystemLog", "Log");
        }

    }
}
